<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>

<title>库房分配</title>
<style type="text/css">
td {
	font-size: 14px;
	text-align: center;
}

input {
	text-align: center;
}

table {
	text-align: center;
}
	
#sousuo1{
			background-image:img/search-icon.png;
				position: relative;
					top: -18px;
					left:-15px
										
		}	
</style>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<link type="text/css" rel="stylesheet" href="css/index.css" />
<script src="js/jquery.min.js"></script>
<!-- 动态菜单JS -->
<script type="text/javascript" src="js/menu.js"></script>
</head>

<body>

	<div class="container">
		<div class="cont-top">
			<div class="companyname">ERP管理系统</div>
			<div class="cont-top-middle">
				<ul>
					<li><a href="#">
							<div class="top-middle">
								<img src="img/icon.png">
							</div>
							<div class="top-txt">购物单</div>
					</a></li>

					<li><a href="#">
							<div class="top-middle">
								<img src="img/icon1.png">
							</div>
							<div class="top-txt">收款单</div>
					</a></li>

					<li><a href="#">
							<div class="top-middle">
								<img src="img/icon1.png">
							</div>
							<div class="top-txt">收款单</div>
					</a></li>

					<li><a href="#">
							<div class="top-middle">
								<img src="img/icon1.png">
							</div>
							<div class="top-txt">收款单</div>
					</a></li>

					<li><a href="#">
							<div class="top-middle">
								<img src="img/icon1.png">
							</div>
							<div class="top-txt">收款单</div>
					</a></li>

					<li><a href="#">
							<div class="top-middle">
								<img src="img/icon1.png">
							</div>
							<div class="top-txt">收款单</div>
					</a></li>

				</ul>
			</div>
			<div class="cont-top-rg">
				<ul class="advanced-menu">
					<li>
						<div class="top-search">
							<div class="t-s-l">
								<span class="left-line"></span> <input type="text" value="搜库存"
									class="search-type" disabled> <span
									class="triangle-bottom"></span>
							</div>
							<div class="t-s-l">
							
		
		
		<form action="BuyServlet?act=sousuo" method="post">
		<input type="text" placeholder="请输入商品编码或名称" name="sou" class="search-dt"> 
									<span class="right-line"></span>
										
									<span class="right-icon"> <span class="right-line">
									
									<input type="submit" value="搜索" id="sousuo1" /></span>	
								</form> 
									
									
									
									
									
							</div>
						</div>
					</li>
					<li class="default" style="position: relative;"><span
						class="user"><img src="img/user.png"></span> <a onclick="denglu()"
						class="special">${user.name} <i><img src="img/xl.png"></i></a>
						<div class="drop-down-wrap"
							style="width: 180px; left: 15px; display: none;">
							<div class="drop-down">
								<span class="triangle-border"></span> <span class="triangle-bg"></span>
								<ul class="del-ul">
									<li><a href="#" class="hot">首耀照明</a></li>
									<li><a href="#">小丫头</a></li>
									<li><a href="#">操作日志</a></li>
								</ul>
							</div>
						</div></li>
				</ul>
				<ul class="advanced-menu">
					<li><a href="#"><img src="img/top-icon1.png"></a></li>
					<li><a href="#"><img src="img/top-icon2.png"></a></li>
					<li><a href="#"><img src="img/top-icon3.png"></a></li>
					<li><a href="#"><img src="img/top-icon4.png"></a></li>
					<li><a href="#"><img src="img/top-icon5.png"></a></li>
				</ul>
			</div>
		</div>
		<div class="left-menu" style="height: 949px;">
			<div class="menu-list">
				<ul>
					<li class="menu-list-01">

						<p class="fumenu">库房管理</p> <img class="xiala" src="img/xiala.png" />

						<div class="list-p">
							<a href="BuyServlet?act=kufang">
								<p class="zcd" id="zcd5">入库单</p>
							</a>
							<a href="weixiu.jsp"><p class="zcd" id="zcd6">维修单</p></a>
							
						</div>
					</li>

					<li class="menu-list-02"><a href="ckgl.html">
							<p class="fumenu">产品管理</p> <img class="xiala" src="img/xiala.png" />
					</a>
						<div class="list-p">
							<p class="zcd" id="zcd5">产品库存</p>
							<p class="zcd" id="zcd6">产品成本</p>
							<p class="zcd" id="zcd7">产品属性管理</p>
						</div></li>

					<li class="menu-list-01"><a href="dd-ddgl.html">
							<p class="fumenu">订单管理</p> <img class="xiala" src="img/xiala.png" />
					</a>
						<div class="list-p">
							<p class="zcd" id="zcd8">下单账户</p>
							<p class="zcd" id="zcd9">所属员工</p>
							<p class="zcd" id="zcd10">订单成本</p>
							<p class="zcd" id="zcd1">订单成本费用</p>
							<p class="zcd" id="zcd12">订单总支付金额</p>
							<p class="zcd" id="zcd3">订单商品</p>
							<p class="zcd" id="zcd14">手动增加订单</p>
						</div></li>

					<li class="menu-list-02"><a href="cj-ckd.html">
							<p class="fumenu">财务管理</p> <img class="xiala" src="img/xiala.png" />
					</a>
						<div class="list-p">
							<p class="zcd" id="zcd15">记录出款和入款</p>
							<p class="zcd" id="zcd16">计算一段时间的利润</p>
						</div></li>

					<li class="menu-list-01"><a href="kh-khgl.html">
							<p class="fumenu">客户管理</p> <img class="xiala" src="img/xiala.png" />
					</a>
						<div class="list-p">
							<p class="zcd" id="zcd17">客户基本信息</p>
							<p class="zcd" id="zcd18">客户VIP登记管理</p>
							<p class="zcd" id="zcd19">客户信息管理</p>
							<p class="zcd" id="zcd20">客户订单管理</p>
							<p class="zcd" id="zcd21">转移客户</p>
						</div></li>

					<li class="menu-list-02"><a href="yg-jbxx.html">
							<p class="fumenu">员工管理</p> <img class="xiala" src="img/xiala.png" />
					</a>
						<div class="list-p">
							<p class="zcd" id="zcd22">员工基本信息</p>
							<p class="zcd" id="zcd23">员工权限</p>
							<p class="zcd" id="zcd24">开通新客户</p>
							<p class="zcd" id="zcd25">销售额管理</p>
						</div></li>
				</ul>
			</div>
		</div>

		<div class="right-menu">
			<div class="main-hd">
				<div class="page-teb">
					<div class="l-tab-links">
						<ul style="left: 0;">
							<li class="l-select"><a href="index.jsp"
								style="padding: 0px 25px;">首页</a></li>
							<li class="l-select"><a href="#">库房分配</a> <span
								class="close"></span></li>
						</ul>
					</div>

					<div class="l-tab-content" style="background: #fff;">
						<div class="tab-content-item">
							<div class="home">
								<!--库房分配   开始-->
								<div class="kufang-box">
									<div class="kufang">
										<div class="kf-fl">
											<ul>
												<li>价格方式：<span>库存成本价</span></li>
												<li style="display: none;">仓库：<span>天津站</span></li>
												<li style="display: none;">时间：<span>2016-08-15至2017-08-25</span></li>
											</ul>
										</div>

										<div class="kf-rg">
											<ul>
												<li><span><input type="checkbox" onclick="baofei()">选择报废</span>
												</li>
												<li><span><input type="checkbox" value="true">显示停用商品</span>
												</li>
												<li><span>过滤 <select class="kf-in" id="change"
														onchange="change(this.value)">
														<option>选择过滤</option>
															<option>显示全部</option>
															<option>已领用</option>
															<option>未领用</option>
															<option>已报废</option>
													</select>
												</span></li>
											</ul>
										</div>
									</div>
								</div>

								<div class="kf-tab">
									<div class="headerbar-kf">
										<table class="headerbar" border="0" cellpadding="0"
											cellspacing="1">
										</table>
									</div>


									<div class="kfbody" tabindex="0">
										<table border="0" cellpadding="0" cellspacing="1"
											class="fkbody-rows" style="width: 100%;">
											<tbody>


												<td class="caption cao-l" style="width: 5px;">

													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center; width:30px;" id="anhao" name=${anhao}  >ID</div>
												</td>
												<td class="caption cao-l" >

													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">资产编码</div>
												</td>

												<td class="caption cao-l">

													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">资产名</div>
												</td>
												
												<td class="caption cao-l">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">资产凭证号</div>
												</td>
												<td class="caption cao-l">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">产品序列号</div>
												</td>
												<td class="caption cao-l">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">规格型号</div>
												</td>
												<td class="caption cao-l">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">保修年限</div>
												</td>
												<td class="caption cao-l">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">使用年限</div>
												</td>
												<td class="caption cao-l" colspan="1" rowspan="1">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">资产入账日期</div>
												</td>
												<td class="caption cao-l" colspan="1" rowspan="1">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">财务编码</div>
												</td>
												<td class="caption cao-l" colspan="1" rowspan="1">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">资产单价</div>
												</td>
												<td class="caption cao-l" colspan="1" rowspan="1">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">资产数量</div>
												</td>
												<td class="caption cao-l" colspan="1" rowspan="1">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">资产总价</div>
												</td>
												<td class="caption cao-l" colspan="1" rowspan="1">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">是否入库</div>
												</td>
												<td class="caption cao-l" colspan="1" rowspan="1">
													<div class="caotion-kf-txt"
														style="overflow: hidden; text-align: center;">是否删除</div>
												</td>
												
												</tr>
											</tbody>

											<tbody>
												<form action="BuyServlet?act=buy_ruku" method="post"
													id="container" onsubmit="return checkSubmit();" >
													<c:set var="a" value="0"></c:set>
													<c:forEach var="p" items="${list}">
													
															<tr class="fkbody-s" _rowindex="0">
															<td class="caption-kf" style="overflow: hidden; text-align: center; width:30px;"
																align="center">
																<div class="caotion-kf-txt1" style=" text-align: center; width:30px;">${a+1}</div>
															</td>
																<td class="bodyrow-list" align _columnindex="15" ">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" id=id${a+1} style="text-align: center; "
						readonly="readonly" value=${p.zichannumber}></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15"  >
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" style="text-align: center;width: 80px;"
						readonly="readonly" value=${p.name } id=zichan${a+1}></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-al·ign: right;"><input type="text" id=pingzheng${a+1}
						style="text-align: center;"></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" id=xuliehao${a+1}  
						style="text-align: center;"></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" id=guige${a+1}
						style="text-align: center; width: 80px;"></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" id=baoxiu${a+1}
						style="text-align: center;width: 80px;"></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" id=shiyongnianxian${a+1}
						style="text-align: center;width: 80px;"></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" id=data${a+1}
						style="text-align: center;" value=""></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" id=bianma${a+1}
						style="text-align: center;"></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" style="text-align: center;width: 80px;"
						readonly="readonly" value=${p.danjia } id=danjia${a+1}></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" style="text-align: center;width: 80px;"
						readonly="readonly" value=${p.shuliang } id=shuliang${a+1}></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; text-align: right;"><input type="text" style="text-align: center;width: 80px;"
						readonly="readonly" value=${p.zongjia } id=zongjia${a+1}></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden; "><input type="checkbox" id=text${a+1}
						style="width: 15px; height: 15px; border: 1px" /></div>
																	
															</td>
															<td class="bodyrow-list" align _columnindex="15">
																<div class="bodytxt" style="overflow: hidden;"><input type="button" id=dele${a+1}
						 border:1px" value="删除"  style="text-align: center; "  onclick="dele()" /></div>
																	
															</td>
															
														</tr>
														<c:set var="a" value="${a+1}"></c:set>
													</c:forEach>
												</form>
											</tbody>

										</table>
	
									</div>

									
									<div class="lu">
										共<i>${a}</i>条记录
									</div>

								</div>
								<div class="tab-btn">
									
									<div class="bt-rg">
										<ul>
											<li><button onclick="erea1()">提交</button></li>
											<li><button>退出</button></li>
										</ul>
									</div>
								</div>
								<!--库房分配   结束-->
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

</body>
<script>

var day2 = new Date();
day2.setTime(day2.getTime());
var s2 = day2.getFullYear() + "年" + (day2.getMonth() + 1) + "月"
		+ day2.getDate() + "日";
var b = 2;

for (var i = 1; i < b; i++) {
	b++;
	var zhi = document.getElementById("data" + i);
	
	if (zhi != null) {
		zhi.value = s2
	} else {
		break;
	}

}

function dele(id){
	alert(id);
	
	
}

function denglu(){
	 
	 var bl = confirm('确认重新登陆吗')
		
		if(bl==true){
			window.location.href="login.jsp";
		}
	 
	 
}
function erea1() {

	
	var a = 2;
	var c = 0;
	for (var i = 1; i <= a; i++) {
		a++;
		var eldest = document.getElementById("text" + i);
		
		if (eldest != null) {
			if (eldest.checked == true) {
				//复选框是否被勾选
				c++;				name1    name3
							   
				var en =document.getElementById("id" + i).name = "id" +  c;
				
				document.getElementById("zichan" + i).name = "zichan" + c;

				document.getElementById("pingzheng" + i).name = "pingzheng"
						+ c;
				
				document.getElementById("xuliehao" + i).name = "xuliehao"
					+ c;
				document.getElementById("guige" + i).name = "guige"
					+ c;
				document.getElementById("baoxiu" + i).name = "baoxiu"
					+ c;
				document.getElementById("shiyongnianxian" + i).name = "shiyongnianxian"
					+ c;

				document.getElementById("data" + i).name = "data" + c;
				document.getElementById("bianma" + i).name = "bianma" + c;
				document.getElementById("danjia" + i).name = "danjia" + c;
				document.getElementById("shuliang" + i).name = "shuliang"
						+ c;

				document.getElementById("zongjia" + i).name = "zongjia" + c;

			}
		}else {
			break;

		} 
	}
	document.getElementById("container").submit()

}
	
</script>

</html>
